﻿@model DeviceFinder.Models.UserModels

@{
    ViewBag.Title = "Change User's Information";
}


@{Html.RenderPartial("../Shared/UserCPLeftMenu");}

<h2>ChangeUserInfo</h2>

@using(Html.BeginForm("ChangeUserInfo", "User", FormMethod.Post)) {
    if (ViewData["Result"] != null)
    {
        if (ViewData["Result"].ToString().ToLower().Contains("success"))
        {        
            <p style="color:Green">@ViewData["Result"]</p>
        }
        else
        {            
            <p style="color:Red">@ViewData["Result"]</p>
        }
    }
    
    <fieldset>
        <legend>Change Password Form</legend>
        <ol>
            <li>
                @Html.LabelFor(m => m.OldPassword)
                @Html.PasswordFor(m => m.OldPassword)
                @Html.ValidationMessageFor(m => m.OldPassword)
            </li>
            <li>
                @Html.LabelFor(m => m.NewPassword)
                @Html.PasswordFor(m => m.NewPassword)
                @Html.ValidationMessageFor(m => m.NewPassword)
            </li>
        </ol>
        <input type="image" src="../../Images/change-btn.png" alt="Submit Button"/>
    </fieldset>
}